package com.weihua.controller;

import com.weihua.bo.MachineBo;
import com.weihua.service.MachineService;
import com.weihua.web.ResStatus;
import com.weihua.web.ResponseWrap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RequestMapping("/machine")
@RestController
public class MachineController extends BaseController {

    @Autowired
    private MachineService machineService;

    @RequestMapping("add")
    public ResponseWrap add(){
        MachineBo machinePo = new MachineBo().setCode("n1").setIp("192.168.1.134");
        machineService.save(machinePo);
        return ResponseWrap.wrap(ResStatus.SUCCESS);
    }
}
